package com.flc.archive.mq.consumer;

/**
 * @author haizi
 * @date 2018/1/31
 */
public class ConsumerFactory {

    public static <T> T getConsumer(Class<? extends T> clazz) {
        T obj = null;

        try {
            obj = (T) Class.forName(clazz.getName()).newInstance();
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException e) {
            e.printStackTrace();
        }

        return obj;
    }
}
